<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<input type="text" placeholder="姓名" id="i1">
<input type="text" placeholder="薪资" id="i2">
<input type="text" placeholder="工作" id="i3">
<button onclick="add()">提交</button>
<table border="1px">
  <caption>员工信息表</caption>
  <tr>
    <th>姓名</th>
    <th>薪资</th>
    <th>工作</th>
  </tr>
</table>
<script>
  let i1 = document.querySelector("#i1");
  let i2 = document.querySelector("#i2");
  let i3 = document.querySelector("#i3");
  function add() {
    let tr = document.createElement("tr");
    let nameTd = document.createElement("td");
    let salaryTd = document.createElement("td");
    let jobTd = document.createElement("td");
    tr.append(nameTd,salaryTd,jobTd);
    let table = document.querySelector("table");
    table.append(tr);
    nameTd.innerText = i1.value;
    salaryTd.innerText = i2.value;
    jobTd.innerText = i3.value;
  }
</script>
</body>
</html>